<template>
	<view class="cardOne">
		<view class="card">
			<view class="card_title">
				<image src="/static/img/cardTitle.png" alt=""></image>
				<view class="">基本信息</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">经营业户：</view>
				<view class="card_row_val">{{infoData.businessAccount}}户</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">营运车辆：</view>
				<view class="card_row_val">动力车{{infoData.operatingVehicle}}辆/挂车{{infoData.operatingVehicleG}}辆</view>
			</view>

			<view class="card_row">
				<view class="card_row_label">从业人员：</view>
				<view class="card_row_val">{{infoData.employees}}人</view>
			</view>
		</view>
		<view class="ccc_line"></view>
		<view class="card">
			<view class="card_title">
				<image src="/static/img/cardTitle.png" alt=""></image>
				<view class="">当月运单情况</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">运单数量：</view>
				<view class="card_row_val">{{infoData.billNum}}单</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">运单覆盖率：</view>
				<view class="card_row_val">
					企业{{(cityAllData.billCoverageCompany*100).toFixed(2)}}%/车辆{{(cityAllData.billCoverageVehicle*100).toFixed(2)}}%
				</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">长期未上报运单企业数：</view>
				<view class="card_row_val">{{infoData.notReportedBillCompanyNum}}户</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">长期未上报运单车辆数：</view>
				<view class="card_row_val">{{infoData.notReportedBillVehicleNum}}辆</view>
			</view>
		</view>
		<view class="ccc_line"></view>
		<view class="card">
			<view class="card_title">
				<image src="/static/img/cardTitle.png" alt=""></image>
				<view class="">安全运营情况</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">长期不在线车辆数：</view>
				<view class="card_row_val">{{infoData.offLineVehicleNum}}辆</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">车辆上线率：</view>
				<view class="card_row_val">{{(cityAllData.onLineVehicleRate*100).toFixed(2)}}%</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">长期异地经营车辆数：</view>
				<view class="card_row_val">{{infoData.offSiteOperatingVehicleNum}}辆</view>
			</view>
			<view class="card_row">
				<view class="card_row_label">案件发生率：</view>
				<view class="card_row_val">{{(cityAllData.incidenceRate*100).toFixed(2)}}%</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				infoData: {},
				cityAllData: {
					billCoverageCompany: 0,
					billCoverageVehicle: 0,
					onLineVehicleRate: 0,
					incidenceRate: 0
				}
			};
		},
		mounted() {
			this.$api.cityAllRate().then(rst => {
				if (this.$store.state.userInfo.zipCode == '420000') {
					this.cityAllData = rst.data.data.all
				} else {
					rst.data.data.list.map(item => {
						if (item.areaCode == this.$store.state.userInfo.zipCode)
							this.cityAllData = item
					})
				}
			})
			// console.log(313, this.$store.state.userInfo.zipCode)
			this.$api.cityDetail().then(res => {
				if (this.$store.state.userInfo.zipCode == '420000') {
					this.infoData = res.data.data.all
				} else {
					res.data.data.list.map(item => {
						if (item.areaCode == this.$store.state.userInfo.zipCode)
							this.infoData = item
					})
				}
			})
		},
		methods: {

		},

	}
</script>

<style lang='scss' scoped>
	page {
		width: 100%;
		height: 100%;
	}

	.cardOne {
		height: 100%;
		overflow-y: scroll;
	}

	.ccc_line {
		width: 100%;
		height: 2rpx;
		background-color: #F0F0F0;
		margin: 10rpx 0;
	}

	.card {
		padding: 10rpx 20rpx;
		width: calc(100% - 40rpx);

		.card_title {
			display: flex;
			align-items: center;
			height: 60rpx;
			font-size: 30rpx;
			font-weight: 400;
			color: #333333;

			image {
				width: 25rpx;
				height: 30rpx;
				padding-right: 18rpx;
			}

		}

		.card_row {
			width: 100%;
			display: flex;
			flex-wrap: wrap;
			padding: 16rpx 0;

			.card_row_label {
				width: 316rpx;
				line-height: 1.5;
				font-size: 28rpx;
				font-weight: 400;
				color: #666666;
			}

			.card_row_val {
				width: calc(100% - 316rpx);
				line-height: 1.5;
				word-break: break-all;
				font-size: 28rpx;
				font-weight: 400;
				color: #343434;
			}

		}
	}
</style>